<template>
	<view class="bg-white">
		<cu-custom :bgImage="bgImg" :isBack="true">
			<view slot="content">邀请好友</view>
		</cu-custom>
		<view class="margin">
			<view class="flex align-center justify-center ">
				<view class="text-lg text-bold">邀请好友注册得积分</view>
			</view>
			<view class="flex align-center justify-center ">
				<view class="muted margin-top text-sm">每成功邀请一位好友注册，即可获得100积分，快去邀请吧</view>
			</view>
		</view>
		<view class="margin flex align-center justify-center flex-direction">
			<image style="width: 500rpx;" mode="widthFix" :src="moneyCat"></image>
			<view class="margin-top">
				<u-button size="medium" type="primary" open-type="share" @click="invite">邀请好友</u-button>
			</view>
		</view>

	</view>
</template>

<script>
	import { mapGetters, mapActions } from 'vuex'
	export default {
		data() {
			return {
				bgImg: 'https://jiaoguanyi008.oss-cn-shenzhen.aliyuncs.com/miniPro/images/imgs/customBg.jpg',
				moneyCat: 'https://jiaoguanyi008.oss-cn-shenzhen.aliyuncs.com/miniPro/images/imgs/moneyCat3.jpg',
			}
		},
		onShareAppMessage() {
			// 返回分享的内容配置
			return {
				title: '快来体验一下动物识别！',
				path: `/pages/login/login?inviteCode=${this.userInfo.uid}`,
			};
		},
		onLoad() {
			console.log("这是userInfo", this.userInfo)
		},

		methods: {
			invite() {

			}

		},
		computed: {
			...mapGetters(['userInfo'])
		}
	}
</script>

<style>
	page {
		background-color: #fff;
	}
</style>